<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no,width=device-width">
    <meta name="format-detection" content="telephone=yes"/>
    <title>哈啰通用</title>
    <link rel="stylesheet" href="css/reset.css">
    <link rel="stylesheet" href="css/base.css">
    <link rel="stylesheet" href="css/index.css">
    <style>
.search input{background-color: inherit;}
.show-2{position: relative;}
.com{margin: 0 auto 41px;}
.pic-exhibits{width: 110px;overflow: hidden;}
.down-more{height: 42px;line-height: 46px;text-align: center;background-color: #f2f2f2;position: absolute;bottom: 0;width: 100%;}
@media screen and (min-width: 414px) {
    .pic-exhibits {width: 130px;height: 80px;overflow: hidden;}
}
        .exhibits-box{cursor: pointer;}
        .search-inp{line-height: 30px;w}

    </style>
</head>
<body>k3l.
<div class="wrapper">
    <div class="container">
    <div class="loading-warp">
        <div class="box">
            <div class="box1">
                <img src="images/loading.gif" />
                <span class="text">下拉开始刷新</span>
            </div>
        </div>
    </div>
    <div class="slider">
        <ul class="slider-main">
            <li class="slider-panel">
            <a href="#"><img src="http://app.besenz.cn:9778/Resources/Banner_02.jpg" onerror="onerror=null;src='../../images/Artboard 77 Copy.png'" /></a>
            </li>
            <li class="slider-panel">
                <a href="#"><img src="http://app.besenz.cn:9778/Resources/Banner_01.jpg" onerror="onerror=null;src='../../images/Artboard 77 Copy.png'" /></a>
            </li>
            <li class="slider-panel">
                <a href="#"><img src="http://app.besenz.cn:9778/Resources/Banner_03.jpg" onerror="onerror=null;src='../../images/Artboard 77 Copy.png'" /></a>
            </li>
        </ul>
        <div class="slider-extra">
            <ul class="slider-nav">
                <li class="slider-item"></li>
                <li class="slider-item"></li>
                <li class="slider-item"></li>
            </ul>
        </div>
    </div>
    <div class="show-1">
         <div class="show-1-1">
             <div class="lf dis_in">
                 <img src="images/Artboard 12@3x.png" alt="">
                 <span>场景展示</span>
             </div>
             <div class="rg dis_in hide1">
                  <span>更多</span>
                 <img src="images/Artboard 13@3x.png" alt="">
             </div>
         </div>
        <div class="pic-box">
            <div>
                <a href="http://m.detu.com/zh/pano/show/213392"><img src="images/Artboard 34.png" alt=""></a>
            </div>
            <div>
                <a href="http://m.detu.com/pano/show/205868?picmode=7&id=205868&from=singlemessage&isappinstalled=0"><img src="images/Artboard 35.png" alt=""></a>
            </div>
            <div>
                <a href="http://m.detu.com/zh/pano/show/218099"><img src="images/Artboard 37.png" alt=""></a>
            </div>
            <div>
                <a href="http://m.detu.com/zh/pano/show/220877"><img src="images/Artboard 36.png" alt=""></a>
            </div>
        </div>
    </div>
    <div class="show-2">
        <div class="show-1-1">
            <div class="lf dis_in">
                <img src="images/Artboard 11@3x.png" alt="">
                <span>产品中心</span>
            </div>
            <div class="rg dis_in">
                <span  id="pro-m">更多</span>
                <img src="images/Artboard 13@3x.png" alt="">
            </div>
        </div>
        <div class="search">
            <img src="images/Artboard 14@3x.png" alt="">
            <input type="search" class="search-inp" placeholder="请输入搜索词">
        </div>
        <div class="com" >

        </div>
      <div class="down-more hide1">已经全部加载完毕</div>
    </div>
    </div>
    <nav class="nav-list hide1">
        <a href="javascript:void(0);">
            <span><img src="images/Combined Shape@3x.png" alt=""></span>
            <span class="list-col">首页</span>
        </a>
        <a href="Order/order.html">
            <span><img src="images/Artboard 2 Copy 6@3x.png" alt=""></span>
            <span>订单</span>
        </a>
        <a href="Reimbursement/reimbursement.html">
            <span><img src="images/Artboard 2 Copy 7@3x.png" alt=""></span>
            <span>报销</span>
        </a>
        <a href="Personal/personal.html">
            <span><img src="images/Artboard 2 Copy@3x.png" alt=""></span>
            <span>个人</span>
        </a>
    </nav>
</div>
<script src="js/jquery-1.8.3.min.js"></script>
<script src="js/index.js"></script>
<script src="js/touch.js"></script>
<script src="js/pull.js"></script>
<script src="js/base.js"></script>
<script>
    var $statu = $('.loading-warp .text');
    var pullRefresh = $('.container').pPullRefresh({
        $el: $('.container'),
        $loadingEl: $('.loading-warp'),
        sendData: null,
        url: '',
        autoHide: true,
        callbacks: {
            pullStart: function(){
                $statu.text('松开开始刷新');
            },
            start: function(){
                $statu.text('数据刷新中···');},
            success: function(response){
                $statu.text('数据刷新成功！');},
            end: function(){
                $statu.text('下拉刷新结束');},
            error: function(){
                $statu.text('找不到请求地址,数据刷新失败');}
        }
    });
    //获取滚动条当前的位置
    function getScrollTop() {
        var scrollTop = 0;
        if (document.documentElement && document.documentElement.scrollTop) {
            scrollTop = document.documentElement.scrollTop;
        }
        else if (document.body) {
            scrollTop = document.body.scrollTop;
        }
        return scrollTop;
    }
    //获取当前可视范围的高度
    function getClientHeight() {
        var clientHeight = 0;
        if (document.body.clientHeight && document.documentElement.clientHeight) {
            clientHeight = Math.min(document.body.clientHeight, document.documentElement.clientHeight);
        }
        else {
            clientHeight = Math.max(document.body.clientHeight, document.documentElement.clientHeight);
        }
        return clientHeight;
    }
    //获取文档完整的高度
    function getScrollHeight() {
        return Math.max(document.body.scrollHeight, document.documentElement.scrollHeight);
    }
    var n=0;
    window.onscroll = function () {
        if (getScrollTop() + getClientHeight() == getScrollHeight()){
            n=n+10;
            $.ajax({
                url:'/rest/HomePanel_Level_Detail_Grid2?start='+n+'&count=10',
                type:"GET",
                data: 'id',
                success:function(data){
                    if (data.length == 0) {
                     $('.down-more').show();
                        return;
                    }
                    var comHtml='';
                    for(var i=0;i<data.length;i++){
                        var datas=data[i];
                        var name=datas.InventoryListViewcInvName;
                        var price=datas.InventoryListViewfRetailPrice;
                        var imgs=datas.Picture;
                        var code=datas.InventoryListViewcInvCode;
                        comHtml+=
                            '<div class="exhibits exhibits-box">' +
                            '<div class="pic-exhibits dis_in" >'+
                            '<img src="http://app.besenz.cn:9778/'+imgs+'" onerror="onerror=null;src=\'../../images/Artboard 77 Copy.png\'" alt="">'+
                            '</div>'+
                            '<div class="exhibits-price dis_in b-btm" >'+
                            '<div class="codes hide1">'+code+'</div>'+
                            '<div class="exhibits-style" id="test">'+name+'</div>'+
                            '<div class="exhibits-pri" >'+price+'</div>'+
                            '</div>'+
                            '</div>'
                    }
                    $('.com').append(comHtml);
                }
            });
        }};
</script>
<script>

        $.ajax({
            url:'/rest/HomePanel_Level_Detail_Grid2?start=0&count=10',
            type:"GET",
            dataType: 'json',
            data:'id',
            success:function(data){
                console.log(data);
                var comHtml='';
                for(var i=0;i<data.length;i++){
                    var datas=data[i];
                    var name=datas.InventoryListViewcInvName;
                    var price=datas.InventoryListViewfRetailPrice;
                    var imgs=datas.Picture;
                    var code=datas.InventoryListViewcInvCode;
                   comHtml+=
                       '<div class="exhibits-box">' +
                       '<div class="pic-exhibits dis_in" >'+
                       '<img src="http://app.besenz.cn:9778/'+imgs+'" onerror="onerror=null;src=\'../../images/Artboard 77 Copy.png\'" alt="">'+
                       '</div>'+
                       '<div class="exhibits-price dis_in b-btm" >'+
                       '<span class="codes hide1">'+code+'</span>'+
                       '<div class="exhibits-style" id="test">'+name+'</div>'+
                       '<div class="exhibits-pri" >'+price+'</div>'+
                       '</div>'+
                       '</div>'
                }
                $('.com').html( comHtml);
            }
        });

    $('.exhibits-box').live('click', '.exhibits-price', function(e) {
        var codes = $(this).find('.codes').text();
        var url='product%20information.html?Inventorylistviewcinvcode='+codes+'&start=0&count=15&gxid=2';
          window.location.href = url;
        localStorage.setItem("key",codes);//存储变量名为key，值为value的变量
        localStorage.key = "value"//存储变量名为key，值为value的变量
    });

</script>
</body>
</html>